<template>
  <view class="radio-group" :value="modelValue" @updateModelValue="updateModelValue">
    <slot></slot>
  </view>
</template>

<script>
export default {
  data() {
    return {
      selectValue: "",
    }
  },
  props: {
    modelValue: [String, Number, Boolean],
  },
  computed: {
    modelValueProxy() {
      return this.modelValue;
    },
  },
  methods: {
    updateModelValue(obj, value) {
      this.$emit("updateModelValue", obj, value);
      // this.$emit("update:modelValue", value);
    },
  },
  created() {
    this.selectValue = this.modelValue;
    // console.log(this.selectValue, this.modelValue, 'modelValue')
  },
};
</script>

<style lang="less" scoped>
.radio-group {
  display: flex;
}
</style>